diff options
| author | Adam Soltys <[email protected]> | 2022-12-21 13:40:25 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-21 13:40:25 -0800 |
| commit | 6069ea3a5d9bd36a9bee4fd596aff6492bf43976 (patch) | |
| tree | 922e8c623e7399eb157be1f3f5de8c4b513d58f9 /src/routes/(app)/[username]/generate/+server.js | |
| parent | 92ddba9f367ce9210d3701d24100e72ba4df19a1 (diff) | |
| download | coinos-ui-6069ea3a5d9bd36a9bee4fd596aff6492bf43976.tar.gz coinos-ui-6069ea3a5d9bd36a9bee4fd596aff6492bf43976.zip | |
generate keypair for users that don't have one
Diffstat (limited to 'src/routes/(app)/[username]/generate/+server.js')
| -rw-r--r-- | src/routes/(app)/[username]/generate/+server.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/routes/(app)/[username]/generate/+server.js b/src/routes/(app)/[username]/generate/+server.js new file mode 100644 index 00000000..c63ab5a6 --- /dev/null +++ b/src/routes/(app)/[username]/generate/+server.js @@ -0,0 +1,8 @@ +import { auth, post } from '$lib/utils'; +import { json } from '@sveltejs/kit'; + +export async function POST({ cookies, request }) { + let body = await request.json(); + let user = await post(`/user`, body, auth(cookies)); + return json(user); +} |
